package net.maku.module.organization.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import lombok.AllArgsConstructor;
import net.maku.newbase.NewBaseServiceImpl;
import net.maku.module.organization.dao.OrganizationDao;
import net.maku.module.organization.entity.OrganizationEntity;
import net.maku.module.organization.service.OrganizationService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 组织
 *
 * @author
 */
@Service
@AllArgsConstructor
public class OrganizationServiceImpl extends NewBaseServiceImpl<OrganizationDao, OrganizationEntity> implements OrganizationService {

    @Override
    public List findChildList(Long id) {
        LambdaQueryWrapper<OrganizationEntity> query = new LambdaQueryWrapper<>();
        query.eq(OrganizationEntity::getSuperiorId, id);
        return dao.selectList(query);
    }
}